import Users from '@/types/users';
import request from '@/utils/request';

// 获取用户列表
export function getUsers(params?: any): Promise<Users.IUserList> {
  return request.request({
    url: '/users',
    method: 'get',
    params,
  });
}

export function update(params: any): Promise<any> {
  return request({
    url: '/users',
    method: 'put',
    params,
  });
}

// await getUsers().then(res => {}).catch(err => {});
